package com.likeyoudo.common.enums;


import com.likeyoudo.common.R;

/**
 * @author LikeYouDo
 * @date 2023/11/29 14:53
 */
public enum IconEnum {
    CHECKBOX("checkbox", R.drawable.ruoyi_icon_checkbox),
    BUILD("build", R.drawable.ruoyi_icon_build),
    DOCUMENTATION("documentation", R.drawable.ruoyi_icon_documentation),
    LOG("log", R.drawable.ruoyi_icon_log),
    REDIS_LIST("redis-list", R.drawable.ruoyi_icon_redis_list),
    SYSTEM("system", R.drawable.ruoyi_icon_system),
    MONITOR("monitor", R.drawable.ruoyi_icon_monitor),
    TOOL("tool", R.drawable.ruoyi_icon_tool),
    GUIDE("guide", R.drawable.ruoyi_icon_guide),
    USER("user", R.drawable.ruoyi_icon_user),
    PEOPLE("peoples",R.drawable.ruoyi_icon_peoples),
    TREE_TABLE("tree-table",R.drawable.ruoyi_icon_tree_table),
    TREE("tree",R.drawable.ruoyi_icon_tree),
    POST("post",R.drawable.ruoyi_icon_post),
    DICT("dict",R.drawable.ruoyi_icon_dict),
    EDIT("edit",R.drawable.ruoyi_icon_edit),
    MESSAGE("message",R.drawable.ruoyi_icon_message),
    ONLINE("online",R.drawable.ruoyi_icon_online),
    JOB("job",R.drawable.ruoyi_icon_job),
    DRUID("druid",R.drawable.ruoyi_icon_druid),
    SERVER("server",R.drawable.ruoyi_icon_server),
    REDIS("redis",R.drawable.ruoyi_icon_redis),
    CODE("code",R.drawable.ruoyi_icon_code),
    SWAGGER("swagger",R.drawable.ruoyi_icon_swagger),
    FORM("form",R.drawable.ruoyi_icon_form),
    LOGIN_INFO("logininfo",R.drawable.ruoyi_icon_logininfor),
    EYE_OPEN("eye-open",R.drawable.ruoyi_icon_eye_open),
    SKILL("skill",R.drawable.ruoyi_icon_skill),
    CHART("chart",R.drawable.ruoyi_icon_chart),
    DATE("date",R.drawable.ruoyi_icon_date),
    DASHBOARD("dashboard",R.drawable.ruoyi_icon_dashboard),
    BACK("back",R.drawable.ruoyi_icon_back),
    INTO("into",R.drawable.ruoyi_icon_into),
    ;

    private String iconName;
    private int resId;

    IconEnum(String iconName, int resId) {
        this.iconName = iconName;
        this.resId = resId;
    }

    public static int getResId(String iconName) {
        for (IconEnum value : IconEnum.values()) {
            if (value.iconName.equals(iconName)) {
                return value.resId;
            }
        }
        // 为空则默认
        return DASHBOARD.resId;
    }
}
